{{#if template}}
<template>

</template>
{{/if}}

{{#if script}}
<script lang="ts" setup>
import { ref, reactive } from 'vue'
import useCurrentInstance from '@/hooks/useCurrentInstance'
import type { ElForm } from 'element-plus'
const { globalProperties: proxy } = useCurrentInstance()
type FormInstance = InstanceType<typeof ElForm>
const modelForm = reactive({})
const modelFormRef = ref<FormInstance>()
const modelFormRules = reactive({
  name: [
    {
      required: true,
      message: '',
      blur: 'trigger'
    }
  ]
})
const addForm = () => {
  if (!modelFormRef.value) {
    return
  }
  modelFormRef.value?.validate( async valid => {
    if (!valid) {
      return false
    }
    const res = await proxy.$http.
  })
}
</script>
{{/if}}

{{#if style}}
<style lang="scss" scoped>

</style>
{{/if}}
